package com.qingcheng.java.ai.langchain4j.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

@AiService(
        wiringMode = EXPLICIT,
        streamingChatModel = "qwenStreamingChatModel",
        chatMemoryProvider = "chatMemoryProviderXiaohei", // 会话记忆配置
        tools = "appointmentTools", // 工具配置
        contentRetriever = "contentRetrieverXiaoheiPinecone" // 向量存储配置
)
public interface XiaoheiAgent {

    @SystemMessage(fromResource = "xiaohei-prompt-template-xiaoheizi.txt")
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String message);

}
